import AliyunOSS from 'aliyun-oss-react-native';
import { API_ALIYUN_OSS } from '../api';

const endPoint = 'oss-cn-beijing.aliyuncs.com';

AliyunOSS.enableDevMode();
const configuration = {
  maxRetryCount: 3,
  timeoutIntervalForRequest: 30,
  timeoutIntervalForResource: 24 * 60 * 60
};

AliyunOSS.initWithServerSTS(API_ALIYUN_OSS, endPoint, configuration);
export const bucketName = 'mxb-bucket';

export const BaseDownUrl = `https://${bucketName}.${endPoint}/`;

export default AliyunOSS;
